/*
 * @Author: your name
 * @Date: 2021-10-19 11:36:23
 * @LastEditTime: 2021-10-19 14:58:37
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \shop_project\shop\postcss.config.js
 */
const path = require('path');

module.exports = ({file})=> {
  let width = file.dirname.includes(path.join('node_modules','vant')) ? 375 : 750
  return {
    plugins: {
      'postcss-px-to-viewport': {
        unitToConvert: 'px',
        viewportWidth: width,
        unitPrecision: 5,
        propList: ['*'],
        viewportUnit: 'vw',
        fontViewportUnit: 'vw',
        selectorBlackList: [],
        minPixelValue: 1,
        mediaQuery: false,
        replace: true,
        exclude: undefined,
        include: undefined,
        landscape: false,
        landscapeUnit: 'vw',
        landscapeWidth: 568
      }
    }
  }
}